import request from '@/utils/request'

/**
 * 培训计划列
 * @param {*} query 
 * @returns 
 */
export function ManageList(query) {
    return request({
        url: '/drill/program/list',
        method: 'get',
        params: query
    })
}

/**
 * 培训计划列新增
 * @param {programName,programCategory,beginTime,endTime,paperId,deptId,userIds} data 
 * @returns 
 */
export function ManageAdd(data) {
    return request({
        url: '/drill/program',
        method: 'post',
        data: data
    })
}

/**
 * 培训计划列删除
 * @param {programId} programId 
 * @returns 
 */
export function ManageDelete(programId) {
    return request({
        url: '/drill/program/' + programId,
        method: 'delete',
    })
}

/**
 * 培训计划详情
 * @param {programId} programId 
 * @returns 
 */
export function ManageDetails(programId) {
    return request({
        url: '/drill/program/' + programId,
        method: 'get',
    })
}

/**
 * 培训计划修改
 * @param {programId,userIds} data 
 * @returns 
 */
export function ManageAmend(data) {
    return request({
        url: '/drill/program',
        method: 'put',
        data: data
    })
}